package com.springframework.common;

import com.self.springframework.beans.PropertyValue;
import com.self.springframework.beans.PropertyValues;
import com.self.springframework.beans.factory.ConfigurableListableBeanFactory;
import com.self.springframework.beans.factory.config.BeanDefinition;
import com.self.springframework.beans.factory.config.BeanFactoryPostProcessor;

public class CustomBeanFactoryPostProcessor implements BeanFactoryPostProcessor {
    @Override
    public void postprocessBeanFactory(ConfigurableListableBeanFactory beanFactory) {
        BeanDefinition beanDefinition = beanFactory.getBeanDefinition("userService");
        PropertyValues propertyValues = beanDefinition.getPropertyValues();
        propertyValues.setPropertyValue(new PropertyValue("id",88));
    }
}
